60d46136b76808d53a679cdefccfc210e361caaf,query/src/test/java/io/keen/client/java/KeenQueryTest.java,KeenQueryTest,testFilterInvalid2,#,417

Before Change


    @Test(expected=ServerException.class)
    public void testFilterInvalid2() throws Exception {
        setMockResponse(400, "{\"message\": \"You specified a geo filter on a property other than keen.location.coordinates, which is not allowed. You specified: ''.\", \"error_code\": \"InvalidPropertyNameForGeoFilter\"}");
        Query queryParams = new Query.QueryBuilder(QueryType.COUNT_RESOURCE)
                .withEventCollection(TEST_EVENT_COLLECTION)
                .build();
        queryParams.addFilter(TEST_TARGET_PROPERTY, KeenQueryConstants.LESS_THAN, 5);
        queryParams.addFilter(TEST_TARGET_PROPERTY, KeenQueryConstants.WITHIN, "INVALID");

        Object result = queryClient.execute(queryParams, null);
    }

After Change


    public void testFilterInvalid2() throws Exception {
        setMockResponse(400, "{\"message\": \"You specified a geo filter on a property other than keen.location.coordinates, which is not allowed. You specified: ''.\", \"error_code\": \"InvalidPropertyNameForGeoFilter\"}");
        Query queryParams = new Query.QueryBuilder(QueryType.COUNT_RESOURCE)
                .withEventCollection(TEST_EVENT_COLLECTION)
                .withFilter(TEST_TARGET_PROPERTY, KeenQueryConstants.LESS_THAN, 5)
                .withFilter(TEST_TARGET_PROPERTY, KeenQueryConstants.WITHIN, "INVALID")
                .build();

        QueryResult result = queryClient.execute(queryParams, null);
    }